//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package org.come.until;

import com.tool.image.ImageMixDeal;
import com.tool.role.RoleData;
import com.tool.time.TimeLimit;
import org.come.Frame.DuelBoardJframe;

import org.come.Frame.ZhuFrame;
import org.come.Jpanel.FrameMessageChangeJpanel;
import org.come.Jpanel.GameJpanel;
import org.come.control.TestMain;
import org.come.mouslisten.HotKeyMouseListen;

import java.awt.*;



public class ScrenceUntil {

    public static int Screen_x = 1366;
    public static int Screen_y = 768;
    public static int ChatFram_X = 348;
    public static int ChatFram_y = 768;
    public static int SendMsg_x = 400;
    public static int TeamImg_x = 100;

    public ScrenceUntil() {

    }
    /**
     * 切换屏幕大小 0 800*600 1 1024* 768
     */
    public static void ScreceChange(int type) {

        switch (type) {
            case 0:
                Screen_x = 800;
                Screen_y = 600;
                ChatFram_y = 600;
                SendMsg_x = Screen_x - 628;
//                SendMsg_x = Screen_x - 521;
                //SendMsg_x = 868;
                TeamImg_x = 150;
                ZhuFrame.getZhuJpanel().getjLabelSendMes()
                        .setIcon(CutButtonImage.getImage("inkImg/old/1/Z1006.png", SendMsg_x, 43));
//    修复快捷键切换分辨率不显示BUG开始
                ZhuFrame.getZhuJpanel().showHotKey();
                //    修复快捷键切换分辨率不显示BUG开始结束
                break;
            case 1:
                Screen_x = 1024;
                Screen_y = 768;
                ChatFram_y = 768;
                SendMsg_x = Screen_x - 628;
//                SendMsg_x = Screen_x - 521;
                //SendMsg_x = 868;
                TeamImg_x = 250;
                ZhuFrame.getZhuJpanel().getjLabelSendMes()
                        .setIcon(CutButtonImage.getImage("inkImg/old/1/Z1006.png", SendMsg_x, 43));
//    修复快捷键切换分辨率不显示BUG开始
                ZhuFrame.getZhuJpanel().showHotKey();
                //    修复快捷键切换分辨率不显示BUG开始结束
                break;
            case 2:
                Screen_x = 1366;
                Screen_y = 768;
                ChatFram_y = 768;
                SendMsg_x = Screen_x - 628;
                //SendMsg_x = 868;
                TeamImg_x = 450;
                ZhuFrame.getZhuJpanel().getjLabelSendMes()
                        .setIcon(CutButtonImage.getImage("inkImg/old/1/Z1006.png", SendMsg_x, 43));
//    修复快捷键切换分辨率不显示BUG开始
                ZhuFrame.getZhuJpanel().showHotKey();
                //    修复快捷键切换分辨率不显示BUG开始结束
                break;
//            case 3:
//                Screen_x = 1920;
//                Screen_y = 1080;
//                ChatFram_y = 1080;
//                SendMsg_x = Screen_x - 628;
//                //SendMsg_x = 868;
//                TeamImg_x = 700;
//                ZhuFrame.getZhuJpanel().getjLabelSendMes()
//                        .setIcon(CutButtonImage.getImage("inkImg/old/1/Z1006.png", SendMsg_x, 43));
//                break;
        }

        change();
    }
    /**
     * 根据屏幕大小切换
     */
    public static void change() {
        GameJpanel.getGameJpanel().remove(ZhuFrame.getzhuframe());
        //GameJpanel.getGameJpanel().remove(WLLpetZFrame.getwllpetZFrame());
        ZhuFrame.getzhuframe().remove(ZhuFrame.getZhuJpanel());
        //WLLpetZFrame.getwllpetZFrame().remove(WLLpetZFrame.getWhuJpanel());
        ZhuFrame.getzhuframe().remove(ZhuFrame.getzhuframe().getChangeJpanel());
        //WLLpetZFrame.getwllpetZFrame().remove(WLLpetZFrame.getwllpetZFrame().getChangeJpanel());
        if (FrameMessageChangeJpanel.chatbox.isDisplay()) {
            TestMain.gameJframe.setSize(Screen_x + 6, Screen_y + 28);
        } else {
            TestMain.gameJframe.setSize(Screen_x + ChatFram_X + 6, Screen_y + 28);
        }
        //WLLpetZFrame.getwllpetZFrame().getChangeJpanel().BtnChange();
        // WLLpetZFrame.getwllpetZFrame().getChangeJpanel().setPreferredSize(new Dimension(ChatFram_y,ChatFram_y));
        ZhuFrame.getzhuframe().getChangeJpanel().BtnChange();
        ZhuFrame.getzhuframe().getChangeJpanel().setPreferredSize(new Dimension(ChatFram_X, ChatFram_y));
        ZhuFrame.getZhuJpanel().setPreferredSize(new Dimension(Screen_x, Screen_y));
//        ZhuFrame.getZhuJpanel().setPreferredSize1(new Dimension(Screen_x, Screen_y));
        //WLLpetZFrame.getWhuJpanel().setPreferredSize(new Dimension(Screen_x,Screen_y));
        ZhuFrame.getZhuJpanel().BtnChange();
//        WLLpetZFrame.getWhuJpanel().BtnChange();
        ZhuFrame.getzhuframe().add(ZhuFrame.getZhuJpanel(), "West");
        //WLLpetZFrame.getwllpetZFrame().add(WLLpetZFrame.getwllpetZFrame(),"West");
        ZhuFrame.getzhuframe().add(ZhuFrame.getzhuframe().getChangeJpanel(), "East");
        //WLLpetZFrame.getwllpetZFrame().add(WLLpetZFrame.getwllpetZFrame().getChangeJpanel(),"East");
        ZhuFrame.getzhuframe().pack();
        //WLLpetZFrame.getwllpetZFrame().pack();
        //WLLpetZFrame.getwllpetZFrame().setBounds(0,0,WLLpetZFrame.getwllpetZFrame().getWidth(),WLLpetZFrame.getwllpetZFrame().getHeight());
        ZhuFrame.getzhuframe().setBounds(0, 0, ZhuFrame.getzhuframe().getWidth(), ZhuFrame.getzhuframe().getHeight());
        GameJpanel.getGameJpanel().getMouse().setSize(Screen_x + ChatFram_X, Screen_y+200);
        GameJpanel.getGameJpanel().add(ZhuFrame.getzhuframe());
        // GameJpanel.getGameJpanel().add(WLLpetZFrame.getwllpetZFrame());
        Util.mapmodel.force(ImageMixDeal.userimg.getRoleShow().getX(), ImageMixDeal.userimg.getRoleShow().getY());
        if (TimeLimit.timeLimit != null) {
            TimeLimit.getLimits().Sorting();
        }

        if (FormsManagement.getInternalForm2(9) != null && FormsManagement.getframe(9).isVisible()) {
            if (DuelBoardJframe.getDuelBoardJframe().getDuelBoardJpanel().isShowType()) {
                FormsManagement.getframe(9).setBounds(Screen_x - 210, 215, FormsManagement.getframe(9).getWidth(), FormsManagement.getframe(9).getHeight());
            } else {
                FormsManagement.getframe(9).setBounds(Screen_x - 18, 215, FormsManagement.getframe(9).getWidth(), FormsManagement.getframe(9).getHeight());
            }
        }

        ZhuFrame.getZhuJpanel().SXTeam(ImageMixDeal.userimg.getRoleShow(), RoleData.getRoleData().getTeamBean());
    }
}
